package com.hsylient.ObserverPattern;

/**
 * @Description
 * @Author Hsylient
 * @Date 2022/12/19/17:57
 */
public class Client {

    public static void main(String[] args) {
        Secretary secretary = new Secretary();
        StockObserver admin = new StockObserver("admin", secretary);
        NBAObserver tom = new NBAObserver("tom", secretary);
        secretary.attach(admin);
        secretary.attach(tom);

        secretary.setAction("小心，老板来了。。。");
        secretary.notifyObservers();
    }
}
